<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="members"; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);

echo "<table border=1>";

while ($row = mysql_fetch_array($result)) {
    echo "<TR><TD>" . $row['username'] . "</TD><TD>" . $row['password'] . "</TD></TR>";
}

echo "</table>";

?>
